<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"  
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:plcf="http://www.powerlogic.com.br/plcf" 
	xmlns:tr="http://myfaces.apache.org/trinidad" 
	xmlns:trh="http://myfaces.apache.org/trinidad/html">  
	<ui:composition template="/fcls/template/PlcGeralTemplate.xhtml">
	
		<ui:define name="plc-corpo-acao" >&nbsp;</ui:define>
		
		<ui:define name="plc-corpo-formulario">
			<div id="controleabastecimento" class="plc-form-basico-topo">
				<!-- tituloChave="controleabastecimento.titulo" -->
				<plcf:tabela titulo="Informe o período e clique em Calcular" width="300px;" >
					<plcf:linha>
						<!-- 
						<plcf:celula>
							<plcf:titulo tituloChave="controleabastecimento.mes.referencia" />
							<plcf:data id="anoMesReferencia"
									   value="#{controleAbastecimentoMB.anoMesReferencia}"
									   ajuda.chave="ajuda.anoMesReferencia"
									   tamanho="8"
									   riaUsa="datemask(mask='M9/Y999')"
									   required="false"
									   converter="converterDataMascaraPlc" 
									   />
						</plcf:celula>
						 -->
						<plcf:celula> 
							<plcf:titulo value="#{msg['label.tipoCombustivel']}"/>  
							<plcf:comboDinamico id="tipoCombustivel" 
												value="#{controleAbastecimentoMB.tipoCombustivel}" 
												dominio="TipoCombustivelEntity" 
												exibeBranco="S" 
												required="false"
												ajudaChave="ajuda.tipoCombustivel"/> 
						</plcf:celula> 
						<plcf:celula> 
							<plcf:titulo value="Data Inicial"/>  
							<plcf:data id="dataInicio" 
									   value="#{controleAbastecimentoMB.dataInicio}" 
									   ajudaChave="ajuda.dataExpedicao"
									   required="true"
									   tamanho="10"
									   /> 
						</plcf:celula>  
						<plcf:celula> 
							<plcf:titulo value="Data Final"/>  
							<plcf:data id="dataFim" 
									   value="#{controleAbastecimentoMB.dataFim}" 
									   ajudaChave="ajuda.dataExpedicao"
									   required="true"
									   tamanho="10"
									   /> 
						</plcf:celula>  
						<plcf:celula>
							<plcf:titulo titulo="&nbsp;"/>
							<plcf:botaoAcao id="calculaControleAbastecimento"
											action="#{controleAbastecimentoMB.calculaSaldosCombustiveis}"
											label="controleabastecimento.evt.calcula" />
						</plcf:celula>
					</plcf:linha>
				</plcf:tabela>
			</div>
			
				<div id="#{plcAliasPrefixoAction}Sel" class="plc-form-basico-sel"> 
					<fieldset class="plc-fieldset"> 
						<legend class="plc-fieldset-legend">#{msg['linhacontrolesaldocombustivel.titulo']}</legend>  
						<plcf:iteracao  var="item"  
										value="#{linhasaldocombustivelLista.itensPlc}" 
										styleClass="plc-table-tabsel delimitador tabelaFormulario plc-table-seljsf"
										columnClasses="celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida,celulaControleEntradaSaida"
										headerClass="celulaControleEntradaSaida" >
<!-- 
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="#{msg['label.id']}"/> 
									</span> 
								</f:facet>  
								<plcf:exibe value="#{item.id}" classeCSS="idItem">id</plcf:exibe> 
							</h:column>
 -->
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Tipo"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="width:10px; margin-right: 5px;"  value="#{item.tipoCombustivel}" classeCSS="idItem">Tipo</plcf:exibe> 
							</h:column>
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Data"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="width:10px; margin-right: 5px;"  value="#{item.data}" classeCSS="idItem">Data</plcf:exibe> 
							</h:column>
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Entrada"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="text-align:right; margin-right: 5px;"  value="#{item.entrada}">entrada</plcf:exibe> 
							</h:column>  
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Saída"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="text-align:right; margin-right: 5px;" value="#{item.saida}">saida</plcf:exibe> 
							</h:column>
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Saldo"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="text-align:right; margin-right: 5px;" value="#{item.saldo}">saldo</plcf:exibe> 
							</h:column>  
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="No. Vale"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="text-align:right; margin-right: 5px;" value="#{item.numeroVale}">Numero Vale</plcf:exibe> 
							</h:column>  
							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Fonte"/> 
									</span> 
								</f:facet>  
								<plcf:exibe inlineStyle="margin-right: 5px;" value="#{item.fonte}">Numero Vale</plcf:exibe> 
							</h:column>							<h:column> 
								<f:facet name="header"> 
									<span class="plc-title af_outputLabel"> 
										<h:outputText value="Observação"/> 
									</span> 
								</f:facet>  
								<plcf:exibe value="#{item.observacao}">Observação</plcf:exibe> 
							</h:column>  
						</plcf:iteracao> 
					</fieldset>  
					<!-- 
					<script>createLineSelection('#{request.contextPath}/f/n/linhaentradasaida');</script> 
					 -->
				</div> 

<!--

	Tabelinha bonita do JQuery
 
 -->
 
<!--
				<div id="#{plcAliasPrefixoAction}Sel" class="plc-form-basico-sel"> 
					<script type="text/javascript">//<![CDATA[
						jQuery(function(){plc.criaSelecaoJqGrid('plc-grid','plc-grid-navegador',{
							evento:'${param.evento}',
								modoJanelaPlc:'${param.modoJanelaPlc}',
								rowNum:'20',
								nomeLogica:'linhasaldocombustivel',
								propAgregada:'linhasaldocombustivel',
								jqGrid:{caption:
									'#{msg['linhacontrolesaldocombustivel.titulo']}',
									colNames:
										['#{msg['label.id']}',
										'#{msg['label.quotaCombustivel']}',
										'#{msg['label.ordemAbastecimento']}',
										'#{msg['label.descricao']}'],
									colModel:[
										{name:'id',index:'id'},
										{name:'quotaCombustivel',index:'quotaCombustivel'},
										{name:'ordemAbastecimento',index:'ordemAbastecimento'},
										{name:'descricao',index:'descricao'}]},
								urlEdicao:'#{request.contextPath}/f/n/linhasaldocombustivelman'});});//]]> 
					</script>  
					<table id="plc-grid" width="100%" class="scroll" cellpadding="0" cellspacing="0"/>  
					<div id="plc-grid-navegador" class="scroll" style="text-align:center;"/> 
				</div> 			
-->			
		</ui:define>

	</ui:composition> 
</html>
